﻿@model Smarly.Bussines.Model.Account.NewAccount

<script type="text/javascript">
	$().ready(function () {
		var $form = $('div.account-create > form');
		$form.smarlyValidation({
			accountCreateUrl: $form.attr('action'),
			onSuccess: function (data) {
				if (data == null || data.redirect == null) {
					window.location.reload(true);
				} else {
					window.location = data.redirect;
				}
			}
		});
	});
</script>


@using (Html.BeginForm("Create", "Account", new {area = "" }))
{
	<div class="modal-body">
		@Html.TextBoxFor(x => x.Email, new { type = "email", placeholder = "Email", @class="icon" })
		@Html.PasswordFor(x => x.Password, new { placeholder = "Пароль", @class="icon" })
		@Html.PasswordFor(x => x.RepeatPassword, new { placeholder = "Еще раз пароль", @class="icon" })
	</div>

	<div class="modal-footer">
		<button class="btn" type="submit"><i class="icon-ok icon-white"></i>&nbsp;Войти</button>
		<button class="btn" data-dismiss="modal"><i class="icon-remove"></i>&nbsp;Отмена</button>
	</div>
}

